<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Ajax post请求</title>
	</head>
	<body>
		<h1>Axios远程调用练习</h1>
		<script src="../js/axios.js"></script>
		<script>
			/* 1.post请求说明 from表单提交/新增入库 */
			/* 实现用户信息的新增 */
			let user = {
				name: '建党百年',
				age: 100,
				sex: '未知'
			}
			//post请求的参数 直接传递
			axios.post("http://localhost:8090/saveUser",user)
			     .then(result => {
					 console.log(result.data)
				 })
				 axios.post("http://localhost:8090/user/好生活/100/其他")
				      .then(result =>{
						  console.log(result.data)
					  })
					// axios.put("http://localhost:8090/saveUser1",user)
					//      .then(result => {
					// 		 console.log(result.data)
					// 	 })
		</script>
	</body>
</html>
